-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have fa() return a htmltools::tag() object #59
base: main
Are you sure you want to change the base?
Conversation
Have you tested the performance of the old vs new code? Note that the tests will also need to include rendering it to HTML text. |
Co-authored-by: Winston Chang <[email protected]>
Quick benchmark: system.time({
for (i in 1:5000) {
as.character(fa("calendar"))
}
}) Result before:
After:
|
Following up on this PR, I think we should merge this only if we have a compelling use case in mind for the tags object over string. It's not too farfetched to imagine a document with a few hundred icons, but in that case, this change would add a non-negligible amount of time; we'd want to make sure there's a benefit that makes the cost worthwhile. |
Closes #58